// Copyright 2016 Proyectos y Sistemas de Mantenimiento SL (eProsima).
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//     http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

/*!
 * @file debug_vect.cpp
 * This source file contains the definition of the described types in the IDL file.
 *
 * This file was generated by the tool gen.
 */

#ifdef _WIN32
// Remove linker warning LNK4221 on Visual Studio
namespace { char dummy; }
#endif

#include "debug_vect.h"
#include <fastcdr/Cdr.h>

#include <fastcdr/exceptions/BadParamException.h>
using namespace eprosima::fastcdr::exception;

#include <utility>


debug_vect::debug_vect()
{
    // m_timestamp_ com.eprosima.idl.parser.typecode.PrimitiveTypeCode@6fb0d3ed
    m_timestamp_ = 0;
    // m_name com.eprosima.idl.parser.typecode.AliasTypeCode@6dde5c8c
    memset(&m_name, 0, (10) * 1);
    // m_x_ com.eprosima.idl.parser.typecode.PrimitiveTypeCode@24b1d79b
    m_x_ = 0.0;
    // m_y_ com.eprosima.idl.parser.typecode.PrimitiveTypeCode@281e3708
    m_y_ = 0.0;
    // m_z_ com.eprosima.idl.parser.typecode.PrimitiveTypeCode@35a50a4c
    m_z_ = 0.0;

}

debug_vect::~debug_vect()
{





}

debug_vect::debug_vect(const debug_vect &x)
{
    m_timestamp_ = x.m_timestamp_;
    m_name = x.m_name;
    m_x_ = x.m_x_;
    m_y_ = x.m_y_;
    m_z_ = x.m_z_;
}

debug_vect::debug_vect(debug_vect &&x)
{
    m_timestamp_ = x.m_timestamp_;
    m_name = std::move(x.m_name);
    m_x_ = x.m_x_;
    m_y_ = x.m_y_;
    m_z_ = x.m_z_;
}

debug_vect& debug_vect::operator=(const debug_vect &x)
{

    m_timestamp_ = x.m_timestamp_;
    m_name = x.m_name;
    m_x_ = x.m_x_;
    m_y_ = x.m_y_;
    m_z_ = x.m_z_;

    return *this;
}

debug_vect& debug_vect::operator=(debug_vect &&x)
{

    m_timestamp_ = x.m_timestamp_;
    m_name = std::move(x.m_name);
    m_x_ = x.m_x_;
    m_y_ = x.m_y_;
    m_z_ = x.m_z_;

    return *this;
}

size_t debug_vect::getMaxCdrSerializedSize(size_t current_alignment)
{
    size_t initial_alignment = current_alignment;


    current_alignment += 8 + eprosima::fastcdr::Cdr::alignment(current_alignment, 8);


    current_alignment += ((10) * 1) + eprosima::fastcdr::Cdr::alignment(current_alignment, 1);


    current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4);


    current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4);


    current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4);



    return current_alignment - initial_alignment;
}

size_t debug_vect::getCdrSerializedSize(const debug_vect& data, size_t current_alignment)
{
    (void)data;
    size_t initial_alignment = current_alignment;


    current_alignment += 8 + eprosima::fastcdr::Cdr::alignment(current_alignment, 8);


    if ((10) > 0)
    {
        current_alignment += ((10) * 1) + eprosima::fastcdr::Cdr::alignment(current_alignment, 1);
    }

    current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4);


    current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4);


    current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4);



    return current_alignment - initial_alignment;
}

void debug_vect::serialize(eprosima::fastcdr::Cdr &scdr) const
{

    scdr << m_timestamp_;
    scdr << m_name;

    scdr << m_x_;
    scdr << m_y_;
    scdr << m_z_;
}

void debug_vect::deserialize(eprosima::fastcdr::Cdr &dcdr)
{

    dcdr >> m_timestamp_;
    dcdr >> m_name;

    dcdr >> m_x_;
    dcdr >> m_y_;
    dcdr >> m_z_;
}

/*!
 * @brief This function sets a value in member timestamp_
 * @param _timestamp_ New value for member timestamp_
 */
void debug_vect::timestamp_(uint64_t _timestamp_)
{
m_timestamp_ = _timestamp_;
}

/*!
 * @brief This function returns the value of member timestamp_
 * @return Value of member timestamp_
 */
uint64_t debug_vect::timestamp_() const
{
    return m_timestamp_;
}

/*!
 * @brief This function returns a reference to member timestamp_
 * @return Reference to member timestamp_
 */
uint64_t& debug_vect::timestamp_()
{
    return m_timestamp_;
}

/*!
 * @brief This function copies the value in member name
 * @param _name New value to be copied in member name
 */
void debug_vect::name(const debug_vect__char_array_10 &_name)
{
m_name = _name;
}

/*!
 * @brief This function moves the value in member name
 * @param _name New value to be moved in member name
 */
void debug_vect::name(debug_vect__char_array_10 &&_name)
{
m_name = std::move(_name);
}

/*!
 * @brief This function returns a constant reference to member name
 * @return Constant reference to member name
 */
const debug_vect__char_array_10& debug_vect::name() const
{
    return m_name;
}

/*!
 * @brief This function returns a reference to member name
 * @return Reference to member name
 */
debug_vect__char_array_10& debug_vect::name()
{
    return m_name;
}
/*!
 * @brief This function sets a value in member x_
 * @param _x_ New value for member x_
 */
void debug_vect::x_(float _x_)
{
m_x_ = _x_;
}

/*!
 * @brief This function returns the value of member x_
 * @return Value of member x_
 */
float debug_vect::x_() const
{
    return m_x_;
}

/*!
 * @brief This function returns a reference to member x_
 * @return Reference to member x_
 */
float& debug_vect::x_()
{
    return m_x_;
}

/*!
 * @brief This function sets a value in member y_
 * @param _y_ New value for member y_
 */
void debug_vect::y_(float _y_)
{
m_y_ = _y_;
}

/*!
 * @brief This function returns the value of member y_
 * @return Value of member y_
 */
float debug_vect::y_() const
{
    return m_y_;
}

/*!
 * @brief This function returns a reference to member y_
 * @return Reference to member y_
 */
float& debug_vect::y_()
{
    return m_y_;
}

/*!
 * @brief This function sets a value in member z_
 * @param _z_ New value for member z_
 */
void debug_vect::z_(float _z_)
{
m_z_ = _z_;
}

/*!
 * @brief This function returns the value of member z_
 * @return Value of member z_
 */
float debug_vect::z_() const
{
    return m_z_;
}

/*!
 * @brief This function returns a reference to member z_
 * @return Reference to member z_
 */
float& debug_vect::z_()
{
    return m_z_;
}


size_t debug_vect::getKeyMaxCdrSerializedSize(size_t current_alignment)
{
    size_t current_align = current_alignment;








    return current_align;
}

bool debug_vect::isKeyDefined()
{
   return false;
}

void debug_vect::serializeKey(eprosima::fastcdr::Cdr &scdr) const
{
    (void) scdr;
     
     
     
     
     
}
